#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024, Thomas Sommer
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------

def init(module):
	module.name = ":driver:as5600"
	module.description = """\
# AS5600 10 bit absolute encoder I2C driver

[Datasheet](https://ams.com/documents/20143/36005/AS5600_DS000365_5-00.pdf)
"""

def prepare(module, options):
	module.depends(
		":architecture:gpio",
		":architecture:i2c.device",
		":processing:resumable",
		":math:geometry"
    )
	return True

def build(env):
    env.outbasepath = "modm/src/modm/driver/encoder"
    env.copy("as5600.hpp")
